package cn.pconline.officialclub.entity;

import java.util.Date;

import org.gelivable.dao.Column;
import org.gelivable.dao.Entity;
import org.gelivable.dao.Id;
import org.gelivable.dao.Mid;

/**
 * 官方车友会PV表
 *
 * @author <a href="mailto:chensy0203@163.com">chensy</a>
 */
@Entity(tableName = "oac_club_pv", split = "Mod:oClubId:10")
public class OClubPv extends EntityKit {

    /**
     * 官方车友会ID
     */
    @Id
    @Column(name = "o_club_id")
    private long oClubId;
    /**
     * 日期yyyyMMdd
     */
    @Id
    @Column(name = "ymd")
    private int ymd;
    /**
     * 当天pv数
     */
    @Column(name = "pv")
    private int pv;
    /**
     * 当天第一次访问时间
     */
    @Column(name = "create_at")
    private Date createAt;
    /**
     * 当天最近访问时间
     */
    @Column(name = "update_at")
    private Date updateAt;
    /**
     * pv显示天数*
     */
    public static final int DAY_SHOW = 7;

    /**
     * 兼容geli
     *
     * @return
     */
    public long getOClubId() {
        return oClubId;
    }

    /**
     * 兼容geli
     *
     * @return
     */
    public void setOClubId(long oClubId) {
        this.oClubId = oClubId;
    }

    public long getoClubId() {
        return oClubId;
    }

    public void setoClubId(long oClubId) {
        this.oClubId = oClubId;
    }

    public int getYmd() {
        return ymd;
    }

    public void setYmd(int ymd) {
        this.ymd = ymd;
    }

    public int getPv() {
        return pv;
    }

    public void setPv(int pv) {
        this.pv = pv;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public Date getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(Date updateAt) {
        this.updateAt = updateAt;
    }

    public Mid getId() {
        return new Mid(oClubId, ymd);
    }
}
